Repository navigation
fix(backups): watchdog reports mesh restore verification per leg and store (#13463) - #13671
Merged
Merged
Conversation
…store (#13463) Add a mesh job to laptop-backups-watchdog: every leg x store pair in the backup mesh must have a successful restore-verification record no older than a quarter, or the watchdog fails naming the leg and store. The records are the rotation's durable evidence; a missing, unreadable, failed, future or stale record is each named distinctly. Add services.laptop-backups.watchdog.meshEnable (default false, so no host fails before the rotation runners exist) and meshMaxAgeHours. Test with a fresh 18-pair fixture, a deliberately stalled class-a/laptop leg, a fresh-but-failed restore, and a missing embeds/drive record. No schedule is created in this slice, so the schedule registry is unchanged.
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 20 minutes. View limit details
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. |
4 tasks
This was referenced Nov 24, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
First slice of #13463: the
laptop-backups-watchdoggains ameshjob that reports restore verification, not just backup freshness.Records are the rotation's durable evidence (design §9), one JSON per pair:
{"leg":"class-a","store":"r2","verified_at":"2026-11-20T12:00:00Z","result":"ok","detail":"scratch restore; row counts match manifest"}Default legs
class-a,class-b,replicate,class-d,class-e,embeds(class F is gated on #9094) and storesr2,laptop,drive, both env-overridable. Quarterly bound: 2200h.Module:
services.laptop-backups.watchdog.meshEnable(default false, so no host fails before rotation runners exist) addsmeshtowatchdogJobs;meshMaxAgeHourssets the bound. No new timer/schedule is created in this slice, sodoc/fleet-schedule-registry.mdis intentionally unchanged.Evidence
origin/main): the suite has no mesh scenarios and the script rejectsmeshas an unknown job name (it would silently check nothing).bash nixos/home/laptop-backups-watchdog.test.sh, all 56 assertions pass, including the new ones):The stalled-leg case is the acceptance demo:
class-a/laptopverified 100 days ago while the other 17 pairs are 10 days old.nix-instantiate --parse nixos/home/laptop-backups.nixpasses;bash -nandshellcheck -S warningclean on both scripts.Not in this slice: the rotation runner that writes the records (
cold-store-drill-style self-gating script + timer), the registry row that comes with it, and the corrupted-snapshot check — those stay on #13463 behind the leg issues' first verifications.Merge Danger
Door: two-way — the mesh job is off by default; the only behavior change on enabled hosts is a new job name they must opt into.
Blast Radius: one script and its test, plus two optional module settings.
{ "direct_parent": null, "links": [], "lineage": { "design": null, "roadmap_item": null, "priority": null }, "pm_meta": 1, "provenance": { "queue_id": null, "scheduled_start": null, "picked_up_at": null, "work_started_at": null, "created_at": "2026-11-23T20:17:33Z", "session_id": "ses_e5df648f0e5ffejf6itcSx5WLs", "lane": null, "host": "amd", "worktree": "/home/user/git/code-worktrees/oc-code-03-13463", "model": null, "lane_start_issues": [], "workspace_ref": { "kind": "worktree", "id": "/home/user/git/code-worktrees/oc-code-03-13463", "repo": "developing-today/code", "branch": "lane/oc-code-03-13463", "sha": "089206098b9b6ab83986da2a1f1f1cf76b822b2e" }, "auth_subject": "oc-code-04", "stamped_by": "fleet 0.1.0 (native)" } }Open in [code]smith · Need help on this PR? Tag
@codesmith-botwith what you need.